﻿using HomagChina.Basic.CCT.PLC;
using S7.Net;
using System;
using static HomagChina.Basic.CCT.PLC.SiemensProvider;

namespace Proxy
{
    public class SiemensHandle
    {
        public SiemensProvider siemensProvider;
        public SiemensHandle()
        {
            siemensProvider = new SiemensProvider();
        }

        public Plc SiemensPlc(CpuType cpuType, string Ip, short Rock, short Slot)
        {
            return siemensProvider.Init(cpuType, Ip, Rock, Slot);
        }

        public Object GetValue(Plc siemensPlc, PlcInfo plcInfo)
        {
            return siemensProvider.GetValue(siemensPlc, plcInfo);
        }

        public void SetValue(Plc siemensPlc, PlcInfo plcInfo, object value)
        {
            siemensProvider.SetValue(siemensPlc, plcInfo, value);
        }
    }
}
